import { request } from '@/config/request'

// 登录
export const login = (data: { account: string; password: string }) => {
    return request.http({
        url: 'api/login',
        data
    })
}

// 获取用户信息 - 这就是调用 /api/member/member 的地方
export const getUserInfo = () => {
    return request.http({
        url: '/api/member/member',
        method: 'GET'
    })
}

// 注册
export const register = (data: { phone: string; password: string; code: string; resetpassword: string; superior_phone: string }) => {
    return request.http({
        url: 'api/register',
        data
    })
}
